package org.huangrui.controller;

import cn.hutool.core.date.DateUtil;
import jakarta.annotation.Resource;
import org.huangrui.service.FunctionAssistant;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author hr
 * @Create 2025-11-09 17:15
 **/
@RestController
public class ChatFunctionCallingController {
    @Resource
    private FunctionAssistant functionAssistant;

    //  http://localhost:9010/chatfunction/test1
    @GetMapping(value = "/chatfunction/test1")
    public String test1() {
        String chat = functionAssistant.chat("开张发票,公司：尚硅谷教育科技有限公司 税号：atguigu533 金额：668.12");

        System.out.println(chat);

        return "success : " + DateUtil.now() + "\t" + chat;
    }
}
